package com.wechat.admin.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.wechat.admin.model.dto.WeDeviceDto;
import com.wechat.admin.model.entity.WeDevice;
import com.wechat.admin.model.vo.UsableDeviceVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
* @author dell
* @description 针对表【we_device】的数据库操作Mapper
* @createDate 2024-12-15 19:59:39
* @Entity generator.domain.WeDevice
*/
@Mapper
public interface WeDeviceMapper extends BaseMapper<WeDevice> {


    /**
     * 查询用户关联的所有设备信息
     * @param userIds
     * @return
     */
    List<WeDeviceDto> findDevicesByUserIds(@Param("userIds") List<Long> userIds);

    /**
     * 用户查询可使用的设备
     * @param userGroup
     * @return
     */
    List<WeDeviceDto> findUsableDevice(@Param("userGroup") Integer userGroup,@Param("userName") String userName);

}




